Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
rubocop
CHANGELOG
0.76.0 (2019-10-28)
Bug fixes
(Style/FormatStringToken false positive for double % rubocop/rubocop#7439): MakeStyle/FormatStringToken
ignore percent escapes (%%
). ([@buehmann][])(Fix assignment edge-cases in Layout/MultilineAssignmentLayout rubocop/rubocop#7438): Fix assignment edge-cases in
Layout/MultilineAssignmentLayout
. ([@gsamokovarov][])(Make IfUnlessModifier respect rubocop:disable comments rubocop/rubocop#7449): Make
Style/IfUnlessModifier
respectrubocop:disable
comments forMetrics/LineLength
. ([@jonas054][])(Style/SafeNavigation incorrect autocorrect at end of line rubocop/rubocop#7442): Fix an incorrect autocorrect for
Style/SafeNavigation
when an object check followed by a method call with a comment at EOL. ([@koic][])(Style/MultilineWhenThen autocorrect generates invalid Ruby for certain case statements rubocop/rubocop#7434): Fix an incorrect autocorrect for
Style/MultilineWhenThen
when the body ofwhen
branch starts withthen
. ([@koic][])(Add forward slash to LITERAL_REGEX rubocop/rubocop#7464): Let
Performance/StartWith
andPerformance/EndWith
correct regexes that contain forward slashes. ([@eugeneius][])Changes
(Allow
os
as method parameter in default config rubocop/rubocop#7465): Addos
to allowed names ofNaming/UncommunicativeMethodParamName
cop in default config. ([@nijikon][])(How to detect when the result of Array#sort isn't captured? rubocop/rubocop#7446): Add
merge
to list of non-mutating methods. ([@cstyles][])(Cop naming guidelines rubocop/rubocop#7077): (Breaking) Rename
Unneeded*
cops toRedundant*
(e.g.,Style/UnneededPercentQ
becomesStyle/RedundantPercentQ
). ([@scottmatthewman][])(Display ABC Metric components with the value rubocop/rubocop#7396): Display assignments, branches, and conditions values with the offense. ([@avmnu-sng][])
0.75.1 (2019-10-14)
Bug fixes
(Pacman formatter depends on tput rubocop/rubocop#7391): Support pacman formatter on Windows. ([@laurenball][])
(Style/FormatStringToken doesn't work inside a hash rubocop/rubocop#7407): Make
Style/FormatStringToken
work inside hashes. ([@buehmann][])(Cannot determine formatter for "p" rubocop/rubocop#7389): Fix an issue where passing a formatter might result in an error depending on what character it started with. ([@jfhinchcliffe][])
(Style/SafeNavigation adding broken comments, no output to console regarding this. rubocop/rubocop#7397): Fix extra comments being added to the correction of
Style/SafeNavigation
. ([@rrosenblum][])(Fix heredoc edge cases in Layout/EmptyLineAfterGuardClause rubocop/rubocop#7378): Fix heredoc edge cases in
Layout/EmptyLineAfterGuardClause
. ([@gsamokovarov][])(Layout/IndentAssignment removes nested indentation rubocop/rubocop#7404): Fix a false negative for
Layout/IndentAssignment
when multiple assignment with line breaks on each line. ([@koic][])Changes
(Style/FormatStringToken should inspect printf argument rubocop/rubocop#7410):
Style/FormatStringToken
now finds unannotated format sequences inprintf
arguments. ([@buehmann][])(Metrics/LineLength should ignore rubocop comments rubocop/rubocop#6964): Set default
IgnoreCopDirectives
totrue
forMetrics/LineLength
. ([@jdkaplan][])0.75.0 (2019-09-30)
New features
(Don't use
#send
etc. to include or prepend modules rubocop/rubocop#7274): Add newLint/SendWithMixinArgument
cop. ([@koic][])(Show warning message if passed string to 'Enabled' key in .rubocop.yml rubocop/rubocop#7272): Show warning message if passed string to
Enabled
,Safe
,SafeAutocorrect
, andAutoCorrect
keys in .rubocop.yml. ([@unasuke][])(Make it possible to set StyleGuideBaseURL per department rubocop/rubocop#7295): Make it possible to set
StyleGuideBaseURL
per department. ([@koic][])(Add check for calls to remote_byebug to Lint/Debugger Cop. rubocop/rubocop#7301): Add check for calls to
remote_byebug
toLint/Debugger
cop. ([@riley-klingler][])(Allow YAML aliases in .rubocop.yml file rubocop/rubocop#7321): Allow YAML aliases in
.rubocop.yml
. ([@RaymondFallon][])(Introduce Pacman style formatter rubocop/rubocop#7317): Add new formatter
pacman
. ([@crojasaragonez][])(Add support for ignore pattern in MethodName cop rubocop/rubocop#6075): Support
IgnoredPatterns
option forNaming/MethodName
cop. ([@koic][])(Add Todo alias and make --disable-autocorrect mark Cops as Todo rubocop/rubocop#7335): Add todo as an alias to disable.
--disable-uncorrectable
will now disable cops usingrubocop:todo
instead ofrubocop:disable
. ([@desheikh][])Bug fixes
(Pacman formatter depends on tput rubocop/rubocop#7391): Support pacman formatter on Windows. ([@laurenball][])
(Style/RedundantParentheses auto-correct fails on method calls where argument begins with a hash rubocop/rubocop#7256): Fix an error of
Style/RedundantParentheses
on method calls where the first argument begins with a hash literal. ([@halfwhole][])(Weird autocorrect with Layout/IndentFirstArrayElement when using tabs rubocop/rubocop#7263): Make
Layout/SpaceInsideArrayLiteralBrackets
properly handle tab-indented arrays. ([@buehmann][])(Layout/SpaceInsideStringInterpolation auto-correct gives infinite loops with multiline interpolations rubocop/rubocop#7252): Prevent infinite loops by making
Layout/SpaceInsideStringInterpolation
skip over interpolations that start or end with a line break. ([@buehmann][])(FormatParameterMismatch fails when modifiers appear before name rubocop/rubocop#7262):
Lint/FormatParameterMismatch
did not recognize named format sequences like%.2<name>f
where the name appears after some modifiers. ([@buehmann][])(Lint/NumberConversion: Exception when
to_i
is called without a receiver rubocop/rubocop#7253): Fix an error forLint/NumberConversion
when#to_i
called without a receiver. ([@koic][])(Autocorrect produces invalid syntax for Style/TrailingCommaIn(Array|Hash)Literal and Layout/Multiline(Array|Hash)BraceLayout rubocop/rubocop#7271), #6498: Fix an interference between
Style/TrailingCommaIn*Literal
andLayout/Multiline*BraceLayout
for arrays and hashes. ([@buehmann][])(Style/FrozenStringLiteralComment matches arbitrary token as being no offense rubocop/rubocop#7241): Make
Style/FrozenStringLiteralComment
match only true & false. ([@tejasbubane][])(Style/ConditionalAssignment auto correct removes nested unless inside else rubocop/rubocop#7290): Handle inner conditional inside
else
inStyle/ConditionalAssignment
. ([@jonas054][])(Layout/MultilineBlockLayout cop auto-correct ignoring LineLength rubocop/rubocop#5788): Allow block arguments on separate lines if line would be too long in
Layout/MultilineBlockLayout
. ([@jonas054][])(Style/BlockDelimiters not triggered with attribute assignment rubocop/rubocop#7305): Register
Style/BlockDelimiters
offense when block result is assigned to an attribute. ([@mvz][])(auto-gen-config should remove inline disable/enable rubocop/rubocop#4802): Don't leave any
Lint/UnneededCopEnableDirective
offenses undetected/uncorrected. ([@jonas054][])(
Style/AccessModifierDeclarations
wrong offense detected rubocop/rubocop#7326): Fix a false positive forStyle/AccessModifierDeclarations
when access modifier name is used for hash literal value. ([@koic][])(False positive from
Lint/UselessAssignment
with if/unless modifier rubocop/rubocop#3591): Handle modifierif
/unless
correctly inLint/UselessAssignment
. ([@jonas054][])(Style/SafeNavigation autocorrect removes comments rubocop/rubocop#7161): Fix
Style/SafeNavigation
cop for preserve comments inside if expression. ([@tejasbubane][])(BracesAroundHashParameters flagging necessary braces as redundant rubocop/rubocop#5212): Avoid false positive for braces that are needed to preserve semantics in
Style/BracesAroundHashParameters
. ([@jonas054][])(Style/RedundantSelf creates false positive with multiple assignment rubocop/rubocop#7353): Fix a false positive for
Style/RedundantSelf
when receiver and multiple assigned lvalue have the same name. ([@koic][])(Style/RedundantSelf creates false positive with multiple assignment rubocop/rubocop#7353): Fix a false positive for
Style/RedundantSelf
when a self receiver is used as a method argument. ([@koic][])(Style/NestedModifier auto-corrects into invalid ruby code rubocop/rubocop#7358): Fix an incorrect autocorrect for
Style/NestedModifier
when parentheses are required in method arguments. ([@koic][])(Multiline Style/TernaryParentheses auto-correction results in a ruby syntax error rubocop/rubocop#7361): Fix a false positive for
Style/TernaryParentheses
when only the closing parenthesis is used in the last line of condition. ([@koic][])(Layout/IndentAssignment + Layout/IndentFirstArgument + multi-variable assignment => Infinite loop rubocop/rubocop#7369): Fix an infinite loop error for
Layout/IndentAssignment
withLayout/IndentFirstArgument
when using multiple assignment. ([@koic][])(Layout/IndentAssignment breaks some code rubocop/rubocop#7177), #7370: When correcting alignment, do not insert spaces into string literals. ([@buehmann][])
(Style/OrAssignment : undefined method `source' for nil:NilClass rubocop/rubocop#7367): Fix an error for
Style/OrAssignment
cop whenthen
branch body is empty. ([@koic][])(Style/BlockDelimiters and Layout/SpaceInsideBlockBraces auto-corrections don't play well together rubocop/rubocop#7363): Fix an incorrect autocorrect for
Layout/SpaceInsideBlockBraces
andStyle/BlockDelimiters
when using multiline empty braces. ([@koic][])(Layout/EmptyLinesAroundAccessModifier and Lint/UselessAccessModifier should only apply at class scope rubocop/rubocop#7212): Fix a false positive for
Layout/EmptyLinesAroundAccessModifier
andUselessAccessModifier
when using method with the same name as access modifier around a method definition. ([@koic][])Changes
(Mark Style/StringHashKeys as unsafe rubocop/rubocop#7312): Mark
Style/StringHashKeys
as unsafe. ([@prathamesh-sonpatki][])(Style/VariableName doesn't work for method arguments rubocop/rubocop#7275): Make
Style/VariableName
aware argument names when invoking a method. ([@koic][])(Style/IfUnlessModifier not reporting lines longer than MaxLineLength rubocop/rubocop#3534): Make
Style/IfUnlessModifier
report and auto-correct modifier lines that are too long. ([@jonas054][])(Autocorrect reacts to EmptyLineAfterMagicComment config rubocop/rubocop#7261):
Style/FrozenStringLiteralComment
no longer inserts an empty line after the comment. This is left toLayout/EmptyLineAfterMagicComment
. ([@buehmann][])(Style/FormatStringToken with flags/modifiers rubocop/rubocop#7091):
Style/FormatStringToken
now detects format sequences with flags and modifiers. ([@buehmann][])(Rename an option name for
Style/MethodCallWithArgsParentheses
rubocop/rubocop#7319): RenameIgnoredMethodPatterns
option toIgnoredPatterns
option forStyle/MethodCallWithArgsParentheses
. ([@koic][])(Style/YodaCondition: not necessarily safe to autocorrect rubocop/rubocop#7345): Mark unsafe for
Style/YodaCondition
. ([@koic][])Compare URL
rubocop-performance
Bug fixes
(Fix an error forPerformance/RedundantMerge
rubocop/rubocop-performance#74): Fix an error forPerformance/RedundantMerge
whenMaxKeyValuePairs
option is set tonull
. ([@koic][])(Performance/FlatMap does not work with
block_pass
rubocop/rubocop-performance#70): This PR fixes a false negative forPerformance/FlatMap
when using symbol to proc operator argument ofmap
method. ([@koic][], [@splattael][])Changes
SafeMode
fromPerformance/Count
andPerformance/Detect
. SetSafeAutoCorrect
tofalse
for these cops by default. ([@rrosenblum][])rspec-support
(Tomita Masahiro, Jon Rowe, #378)
parallel
parser
CHANGELOG